/*=======  Gallery  =======*/
.project-gallery {
  padding: 110px 0px 90px;
  position: relative;
}
.project-gallery .mix {
  display: block !important;
}
.project-gallery .shape {
  position: absolute;
  bottom: 0px;
  left: 0px;
  width: 500px;
  z-index: -9;
}
.project-gallery .project-gallery-filter .project-gallery-menu {
  margin-bottom: 30px;
  padding-left: 0px;
}
.project-gallery .project-gallery-filter .project-gallery-menu .filter {
  margin: 5px;
  list-style: none;
  display: inline-block;
  padding: 12px 30px;
  border-radius: 5px;
  cursor: pointer;
  border: 2px solid #0c59db;
  color: #0c59db;
  font-weight: 600;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease-out 0s;
}
@media (max-width: 991px) {
  .project-gallery .project-gallery-filter .project-gallery-menu .filter {
    padding: 9px 25px;
  }
  .project-gallery .project-gallery-item .gallery-item .item-thumbnail {
    min-height: 280px;
    height: 320px;
  }
}
@media (max-width: 575px) {
  .project-gallery .project-gallery-filter .project-gallery-menu .filter {
    padding: 8px 20px;
  }
  .project-gallery .project-gallery-item .gallery-item .item-thumbnail {
    min-height: 250px;
    height: 280px;
  }
}
.project-gallery .project-gallery-filter .project-gallery-menu .filter.active, .project-gallery .project-gallery-filter .project-gallery-menu .filter:hover {
  color: #fff;
  background: #0c59db;
}
.project-gallery .project-gallery-filter .project-gallery-menu .filter a {
  color: inherit;
  text-decoration: none;
}
.project-gallery .project-gallery-item .gallery-item .item-thumbnail {
  margin-bottom: 30px;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  width: 100%;
  min-height: 300px;
  height: 370px;
  background-color: #f8f9fa;
}
.project-gallery .project-gallery-item .gallery-item .item-thumbnail .img {
  position: absolute;
  top: 0px;
  left: 0px;
  width: 100%;
  height: 100%;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain; /* Changed from cover to contain to show full image */
}
.project-gallery .project-gallery-item .gallery-item .item-thumbnail .content-overlay {
  position: absolute;
  top: 5%;
  left: 5%;
  width: 0%;
  height: 90%;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 10px;
  transition: all 0.3s ease-out 0s;
  z-index: 2;
}
.project-gallery .project-gallery-item .gallery-item .item-thumbnail .content-overlay .content .links a {
  position: absolute;
  right: 5%;
  top: 10%;
  width: 40px;
  height: 40px;
  line-height: 40px;
  border-radius: 50%;
  border: 1px solid #555;
  text-align: center;
  font-size: 16px;
  color: #555;
  transition: all 0.5s;
  transform: translateX(50px);
  opacity: 0;
  visibility: hidden;
  text-decoration: none;
}
.project-gallery .project-gallery-item .gallery-item .item-thumbnail .content-overlay .content .links a:hover {
  background: #0c59db;
  border-color: #0c59db;
  color: #fff;
}
.project-gallery .project-gallery-item .gallery-item .item-thumbnail .content-overlay .content .links a.image-preview {
  margin-right: 12px;
}
.project-gallery .project-gallery-item .gallery-item .item-thumbnail .content-overlay .content .info {
  position: absolute;
  bottom: 10%;
  left: 10%;
  overflow: hidden;
}
.project-gallery .project-gallery-item .gallery-item .item-thumbnail .content-overlay .content .info .tag {
  margin-bottom: 0px;
  color: #555;
  font-weight: 400;
  font-size: 14px;
  line-height: 24px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(50px);
  transition: all 0.4s;
}
.project-gallery .project-gallery-item .gallery-item .item-thumbnail .content-overlay .content .info .project-name {
  font-size: 18px;
  line-height: 28px;
  font-weight: 600;
  margin-top: 0px;
  color: #555;
  opacity: 0;
  visibility: hidden;
  transform: translateY(50px);
  transition: all 0.4s;
}
.project-gallery .project-gallery-item .gallery-item .item-thumbnail:hover .content-overlay {
  opacity: 1;
  width: 90%;
}
/* Ensure images are fully visible on hover */
.project-gallery .project-gallery-item .gallery-item .item-thumbnail:hover .img {
  background-size: contain;
}
.project-gallery .project-gallery-item .gallery-item .item-thumbnail:hover .content-overlay .content .links a {
  transform: translateX(0px);
  opacity: 1;
  visibility: visible;
  transition-delay: 0.3s;
}
.project-gallery .project-gallery-item .gallery-item .item-thumbnail:hover .content-overlay .content .info .tag {
  opacity: 1;
  visibility: visible;
  transform: translateY(0px);
  transition-delay: 0.3s;
}
.project-gallery .project-gallery-item .gallery-item .item-thumbnail:hover .content-overlay .content .info .project-name {
  opacity: 1;
  visibility: visible;
  transform: translateY(0px);
  transition-delay: 0.5s;
}


/* Gallery Modal */
.gallery-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.9);
  overflow: auto;
  padding: 20px;
  box-sizing: border-box;
}
.gallery-modal .modal-content {
  position: relative;
  margin: 0 auto;
  padding: 0;
  max-width: 90%;
  max-height: 90vh;
  top: 50%;
  transform: translateY(-50%);
  text-align: center;
  background: transparent;
  display: inline-block;
}
.gallery-modal .image-wrapper {
  position: relative;
  display: inline-block;
}
.gallery-modal .close-modal {
  position: absolute;
  top: 10px;
  right: 10px;
  color: #fff;
  font-size: 30px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10001;
  width: 40px;
  height: 40px;
  line-height: 40px;
  text-align: center;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  transition: all 0.3s;
}
.gallery-modal .close-modal:hover {
  background: rgba(12, 89, 219, 0.8);
  color: #fff;
  transform: scale(1.1);
}
.gallery-modal img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 90vh;
  display: block;
  line-height: 0;
  box-sizing: border-box;
  margin: 0 auto;
  border-radius: 5px;
}
.gallery-modal h4 {
  color: #fff;
  margin-top: 20px;
  display: none;
}